﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Frame.master" AutoEventWireup="true" CodeFile="monthTicketAction.aspx.cs" Inherits="monthTicketAction" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleHolder" Runat="Server">
<asp:Label runat="server" ID="lblTitle"></asp:Label>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentHolder" Runat="Server">
<script type="text/javascript">
$(document).ready(function () {
         initJQueryWidgets();
     });

     function initJQueryWidgets() {
         $("[ID$=txtFromDate]").datepicker({
             changeMonth: true,
             changeYear: true
         });
          $("[ID$=txtEndDate]").datepicker({
             changeMonth: true,
             changeYear: true
         });
     }
</script>
<asp:Label ID="lblMsg" runat="server" ForeColor="#FF0000"></asp:Label>
    <table width="680" border="0" cellpadding="0" cellspacing="0" class="margin_b10 margin_l100">
        <tr>
            <td class="titleInfo">
                Thông tin chung của khách hàng
            </td>
        </tr>
    </table>

    <table width="700" border="0" cellpadding="5" cellspacing="0" class="margin_b10" style="margin-left:120px;">
        <tr>
            <td align="left" width="200" id="tdTicketInfo" runat="server" visible="false">
                <table width="400" border="0" cellpadding="5" cellspacing="0">
                    <tr>
                        <td align="left">Biển số: <asp:Label ID="lblPlate" runat="server" Font-Bold="true" /></td>
                    </tr>
                    <tr>
                        <td align="left">Hầm xe: <asp:Label ID="lblFloor" runat="server" Font-Bold="true" /></td>
                    </tr>
                    <tr>
                        <td align="left">Loại xe: <asp:Label ID="lblType" runat="server" Font-Bold="true" /></td>
                    </tr>
                    <tr>
                        <td align="left">Màu xe: <asp:Label ID="lblColor" runat="server" Font-Bold="true" /></td>
                    </tr>
                     <tr>
                        <td align="left">Giá trị vé tháng:  <asp:Label ID="lblDate" runat="server" Font-Bold="true" /></td>
                    </tr>
                </table>
            </td>
            <td align="left" valign="top">
            
                <table width="300" border="0" cellpadding="5" cellspacing="0">
                    <tr>
                        <td align="left">Mã số: <asp:Label ID="lblCode" runat="server" Font-Bold="true" /></td>
                    </tr>
                    <tr>
                        <td align="left">Tên: <asp:Label ID="lblName" runat="server" Font-Bold="true" /></td>
                    </tr>
                    <tr>
                        <td align="left">Điện thoại: <asp:Label ID="lblPhone" runat="server" Font-Bold="true" /></td>
                    </tr>
                    <tr>
                        <td align="left">Địa chỉ: <asp:Label ID="lblAddress" runat="server" Font-Bold="true" /></td>
                    </tr>
                </table>
            </td>
        </tr>
       
    </table>
    
    <table width="680" border="0" cellpadding="0" cellspacing="0" class="margin_b10 margin_l100">
        <tr>
            <td class="titleInfo">
                <asp:Literal ID="ltrTitleInfo" runat="server" Text="Thông tin bán vé gia hạn" />
            </td>
        </tr>
    </table>
    <table width="930" border="0" align="center" cellpadding="3" cellspacing="1" class="margin_l100">
    <asp:Panel ID ="pnlMonthTicket" runat="server">    
        <tr>
            <td width="110" align="left" valign="top">
                Biển số
            </td>
            <td align="left" valign="top">
                                    <asp:TextBox ID="txtPlat" runat="server" width="250px"
                                      MaxLength="10"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rqPlat" runat="server" ControlToValidate="txtPlat"
                                        CssClass="errorMsg" ForeColor="#FF0000" SetFocusOnError="True" 
                                        Display="Dynamic"></asp:RequiredFieldValidator>
                                    <asp:Label ID="lblErrorPlat" runat="server" 
                    CssClass="errorMsg" Text="Biển số này đã tồn tại !"
                                        Visible="False" ForeColor="Red"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="left" valign="top">
                Loại xe</td>
            <td align="left" valign="top">
                <asp:DropDownList ID="ddlTypeCar" runat="server" Width="254px" 
                 AutoPostBack="True"  onselectedindexchanged="ddlTypeCar_SelectedIndexChanged"
                    AppendDataBoundItems="true">
                    <asp:ListItem Text="" Value=""></asp:ListItem>
                </asp:DropDownList>
            &nbsp;<asp:RequiredFieldValidator ID="rqPlat0" runat="server" ControlToValidate="ddlTypeCar"
                                        CssClass="errorMsg" ForeColor="#FF0000" SetFocusOnError="True" 
                                        Display="Dynamic"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="left" valign="top">
                Màu xe</td>
            <td align="left" valign="top">
                <asp:DropDownList ID="ddlColor" runat="server" Width="254px" 
                    AppendDataBoundItems="true">
                    <asp:ListItem Text="" Value=""></asp:ListItem>
                </asp:DropDownList>
            &nbsp;<asp:RequiredFieldValidator ID="rqPlat1" runat="server" ControlToValidate="ddlColor"
                                        CssClass="errorMsg" ForeColor="#FF0000" SetFocusOnError="True" 
                                        Display="Dynamic"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="left" valign="top">
                Hầm xe</td>
            <td align="left" valign="top">
                <asp:DropDownList ID="ddlFloor" runat="server" Width="254px" 
                    AppendDataBoundItems="true">
                    <asp:ListItem Text="" Value=""></asp:ListItem>
                </asp:DropDownList>
            &nbsp;<asp:RequiredFieldValidator ID="rqPlat2" runat="server" ControlToValidate="ddlFloor"
                                        CssClass="errorMsg" ForeColor="#FF0000" SetFocusOnError="True" 
                                        Display="Dynamic"></asp:RequiredFieldValidator>
            </td>
        </tr>
    </asp:Panel>
        <tr>
            <td align="left" valign="top">
                Ngày bắt đầu</td>
            <td align="left" valign="top">
                <asp:TextBox ID="txtFromDate" runat="server" width="250px" MaxLength="10"></asp:TextBox>
            &nbsp;<asp:RequiredFieldValidator ID="rqFrom" runat="server" ControlToValidate="txtFromDate"
                                        CssClass="errorMsg" ForeColor="#FF0000" SetFocusOnError="True" 
                                        Display="Dynamic"></asp:RequiredFieldValidator>
                  <asp:Label ID="lblFromErr" runat="server" 
                    CssClass="errorMsg" Text="Ngày bắt đầu phải nhỏ hơn hoặc bằng ngày kết thúc !"
                                        Visible="False" ForeColor="Red"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="left" valign="top">
                Ngày kết thúc</td>
            <td align="left" valign="top">
                <asp:TextBox ID="txtEndDate" runat="server" width="250px" MaxLength="10"></asp:TextBox>
            &nbsp;<asp:RequiredFieldValidator ID="rqEnd" runat="server" ControlToValidate="txtEndDate"
                                        CssClass="errorMsg" ForeColor="#FF0000" SetFocusOnError="True" 
                                        Display="Dynamic"></asp:RequiredFieldValidator>
                <asp:Label ID="lblEndDateErr" runat="server" 
                    CssClass="errorMsg" Text="Sai định dạng ngày/tháng/năm"
                                        Visible="False" ForeColor="Red"></asp:Label>
            </td>
        </tr>
        <tr id="trPrice" runat="server">
            <td align="left" valign="top">
                Giá tiền (VNĐ)</td>
            <td align="left" valign="top">
                <asp:TextBox ID="txtPrice" runat="server" width="250px" MaxLength="9"></asp:TextBox>
                &nbsp;<asp:RequiredFieldValidator ID="rqPrice" runat="server" ControlToValidate="txtPrice"
                                        CssClass="errorMsg" ForeColor="#FF0000" SetFocusOnError="True" 
                                        Display="Dynamic"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="errFrom0" runat="server" 
                                            ControlToValidate="txtPrice" Display="Dynamic" 
                                            ErrorMessage="Chỉ được nhập số." SetFocusOnError="True" 
                                            
                    
                    ValidationExpression="([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$"></asp:RegularExpressionValidator>
                                </td>
        </tr>
        <tr>
            <td align="left" valign="top">
                &nbsp;
            </td>
            <td align="left" valign="top">
                <asp:ImageButton ID="btnSave" runat="server" ImageUrl="~/images/save.gif" OnClick="btnSave_Click" />
                <asp:ImageButton ID="btnReset" runat="server" ImageUrl="~/images/xoa.gif" 
                    OnClick="btnReset_Click" CausesValidation="False" />                
                <asp:ImageButton ID="btnCancel" runat="server" ImageUrl="~/images/huy.gif" 
                    OnClick="btnCancel_Click" CausesValidation="False" />
                
                &nbsp;<asp:HiddenField ID="hdnId" runat="server" />
                <asp:HiddenField ID="hdnPlate" runat="server" />
                <asp:HiddenField ID="hdnCommand" runat="server" />
            </td>
        </tr>
    </table>
</asp:Content>

